﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace Problem20
{
    class Program
    {
        static void Main(string[] args)
        {
            BigInteger fact = new BigInteger(1);

            for (int i = 2; i <= 100; i++)
            {
                fact = BigInteger.Multiply(fact, new BigInteger(i));
            }

            int sum = fact.ToString().Select(x => int.Parse(x.ToString())).Sum();

            Console.WriteLine(sum);
            Console.ReadKey();
        }
    }
}
